﻿//======================================================
//==     (c)2008 aspxcms inc by NeTCMS v1.0              ==
//==          Forum:bbs.aspxcms.com                   ==
//==         Website:www.aspxcms.com                  ==
//======================================================
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml;
using NetCMS.Config;
using System.Net;
using System.IO;

namespace NetCMS.Web.user
{
    public partial class Logout : NetCMS.Web.UI.BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            #region 动易，动网，Oblog 整合
            NetCMS.API.PDO.PDOAction pdo = new NetCMS.API.PDO.PDOAction();
            if (pdo.Enabled())
            {
                pdo.Logout(NetCMS.Global.Current.UserName);
            }
            #endregion


            Logout();

            //try
            //{
            //    #region 整合Discuz!NT
            //    XmlDocument xmlDoc = new XmlDocument();
            //    string xmlName = Server.MapPath("..\\api\\dz\\Adapt.config");
            //    AdaptConfig adConfig = new AdaptConfig(xmlName);           
            //    if (adConfig.isAdapt)
            //    {
            //        string adaptePath = adConfig.adaptPath;
            //        adaptePath += "?tag=logout";
            //        Response.Write("<script type=\"text/javascript\" language=\"javascript\">window.open(\"" + adaptePath + "\",\"\",\"left=5000,top=5000\");</script>");
            //    }
            //    #endregion
            //}
            //finally
            //{

            



            Response.Write("<script type=\"text/javascript\" language=\"javascript\">window.location.replace('Login.aspx');</script>");
            //Response.Redirect("login.aspx");
            Response.End();
            //}
        }
    }
}
